﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ASG.CodeGenerator.Core
{
    /// <summary>
    /// Represents a code fragment.
    /// </summary>
    public abstract class Code
    {
        /// <summary>
        /// When implemented generates the code representing the code instance.
        /// </summary>
        /// <returns>A string represeting the code instance.</returns>
        public abstract string GenerateCode();

        /// <summary>
        /// When implemented gets or sets the parent code instance.
        /// </summary>
        public Code Parent
        {
            get;
            set;
        }
    }
}
